package com.theaf.basemodule.common.dto.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @Author:songwenke
 * @Description:用户
 * @Date:create in 11:30 2017/12/28
 * @Modified By:
 **/
@ApiModel(description = "用户VO模型")
@Data
public class UserDTO implements Serializable {
    private Long id;

    @NotNull(message = "用户名不能空")
    @ApiModelProperty(value = "用户名" )
    private String userName;

    @NotNull(message = "用户密码不能为空")
    @Length(min=6, max=16 , message = "密码长度范围为{min}-{max}位")
    @ApiModelProperty(value = "密码" , required = true)
    private String password;

    @NotNull(message = "机构ID不能空")
    @ApiModelProperty(value = "机构ID")
    private Long orgId;

    @ApiModelProperty(value = "机构名称")
    private String orgName;

    @NotNull(message = "姓名不能为空")
    @ApiModelProperty(value = "姓名")
    private String cname;

    @NotNull(message = "手机不能为空")
    @ApiModelProperty(value = "手机")
    private String mobile;

    @ApiModelProperty(value = "邮箱")
    private String mail;

    @ApiModelProperty(value = "企业微信")
    private String wxId;

    @ApiModelProperty(value = "是否重复登录")
    private boolean repeated;

    @ApiModelProperty(value = "岗位")
    @NotNull(message = "岗位不能为空")
    private Long posId;
    @ApiModelProperty(value = "岗位信息")
    private String posName;

    @ApiModelProperty(value = "限制")
    private String limitIp;

    @ApiModelProperty(value = "增加调整的功能权限")
    private List<Long> adjustAdd;

    @ApiModelProperty(value = "删除调整的功能权限")
    private List<Long> adjustRemove;

    @ApiModelProperty(value = "功能权限，从岗位继承，包括增加或减少的")
    private List<Long> auths;

    @ApiModelProperty(value = "机构数据范围")
    private List<OrgRangeDTO> orgRanges;

    @ApiModelProperty(value = "自定义机构数据范围，多选，见数据字典")
    private List<CusRangeDTO> cusRanges;
}
